import base from '@/api/baseurl';
import request from '@/utils/request'

// 查询
export function findDirectReference(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/directreference/findDirectReference',
    method: 'get',
    params: query
  })
}

// 获取自增编码
export function addgsMaCode() {
  return request({
    baseURL: base.appBaseApi,
    url: '/directreference/addgs_ma_code',
    method: 'get',
  })
}
// 生成曲线下拉
export function findcvtype(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findcvtype',
    method: 'get',
    params: query
  })
}
// 引用曲线名称
export function findcvlist(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findcvlist',
    method: 'get',
    params: query
  })
}

// 新增
export function addDirectReference(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/directreference/addDirectReference',
    method: 'post',
    data
  })
}
// 修改
export function updateDirectReference(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/directreference/updateDirectReference',
    method: 'post',
    data
  })
}

//单行删除
export function deleteDirectReference(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/directreference/deleteDirectReference',
    method: 'get',
    params: query
  })
}



//同步
export function directreferencegenerate(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/directreference/directreferencegenerate',
    method: 'get',
    params: query
  })
}
